const fs = require('fs');
const path = require('path');

const distPath = path.join(__dirname, '..', 'dist');

function cleanDist() {
    if (fs.existsSync(distPath)) {
        fs.rmSync(distPath, { recursive: true, force: true });
        console.log('✅ 清理 dist 目录完成');
    } else {
        console.log('📁 dist 目录不存在，跳过清理');
    }
}

cleanDist(); 